package com.sntk.drugservice.stock.controller;

import com.sntk.drugservice.stock.entity.Test;
import com.sntk.drugservice.stock.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName: TestController
 * @author: wgchao
 * @createTime: 2019/8/19 10:24 AM
 * @Description: TODO
 */
@RestController
public class TestController {
    @Autowired
    private TestService testService;

    @GetMapping("/save/{name}")
    public Test save(@PathVariable("name") String name){
        Test test = new Test();
        test.setName(name);
        return testService.save(test);
    }
}
